﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ClassForWinForm
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string UserName = textBox_UserName.Text;
            string UserPwd = textBox_Pwd.Text;

            if(UserName!="admin")
            {
                MessageBox.Show("用户名不正确！！");
                return;
            }

            if(UserPwd!="123456")
            {
                MessageBox.Show("密码不正确！！");
                return;
            }
            MessageBox.Show("登录成功！！");
        }
    }
}
